﻿<!DOCTYPE html>
<#assign menu="config">
<#assign submenu="update_admin">
<html lang="en">
<head>
	<#include "/manage/head.ftl">
</head>
<body>
<#include "/manage/top.ftl">
	<div class="main-container" id="main-container">
		<script type="text/javascript">
        	try{ace.settings.check('main-container' , 'fixed')}catch(e){}
    	</script>
    	<div class="main-container-inner">
    		 <a class="menu-toggler" id="menu-toggler" href="#">
            	<span class="menu-text"></span>
        	 </a>
        	 <#include "/manage/silderbar.ftl">
        	 <div class="main-content">
        	 	<div class="breadcrumbs" id="breadcrumbs">
                <script type="text/javascript">
                    try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
                </script>

                <ul class="breadcrumb">
                    <li>
                        <i class="icon-home home-icon"></i>
                        <a href="${BASE_PATH}/manage/index.htm">首页</a>
                    </li>
                     <li>
                        <a href="#">设置</a>
                    </li>
                    <li class="active">修改密码</li>
                </ul><!-- .breadcrumb -->

            </div>

            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        	<div class="row">
			<div class="col-lg-12">
				<section class="panel">
					<div class="panel-body">
						<form id="update_admin_form" method="post" class="form-horizontal"
							autocomplete="off" action="${BASE_PATH}/manage/admin/update.json">
							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 col-sm-2 control-label">用户名</label>
									<div class="col-sm-8">
										${admin.name}
									</div>
								</div>								
								<div class="form-group">
									<label class="col-sm-2 col-sm-2 control-label">密码</label>
									<div class="col-sm-8">
										<input type="password" class="form-control" name="password"
											value="" placeholder="密码" id="password">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 col-sm-2 control-label"></label>
									<div class="col-sm-8">
										<button class="btn btn-danger" type="submit">修改</button>
									</div>
								</div>
							</fieldset>
						</form>
					</div>
				</section>
			</div>
		</div>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        	 </div>
    	</div>
	</div>
<#include "/manage/footer.ftl">
<script type="text/javascript">
	$(function() {
		$('#update_admin_form').ajaxForm({
			dataType : 'json',
			success : function(data) {
				if (data.result) {
					bootbox.alert("保存成功，将刷新页面", function() {
						window.location.reload();
					});
				} else {
					showErrors($('#update_admin_form'), data.errors);
				}
			}
		});
	});
</script>
</body>
</html>

